<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class UpValidityDayToCouponTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('coupon', function (Blueprint $table) {
            //
            DB::statement("ALTER TABLE coupon CHANGE COLUMN validity_day validity_day  int(10)  DEFAULT 0 comment '有效期 单位天 0-长期有效' ");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('coupon', function (Blueprint $table) {
            //
            $table->dropColumn('validity_day');
        });
    }
}
